Skip to content

Pipe: Rewrote the OPC UA subscription logic to avoid the bug of third-party subscription model#17525

Open
Caideyipi wants to merge 3 commits intomasterfrom
opc-fix-master
Open

Pipe: Rewrote the OPC UA subscription logic to avoid the bug of third-party subscription model#17525
Caideyipi wants to merge 3 commits intomasterfrom
opc-fix-master

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

@Caideyipi Caideyipi commented Apr 20, 2026

Description

Now the original subscriptionModel has some problems:

  1. The subscription logic for node is async, timely pull, and won't pull the inital value directly. This may cause plenty time, if a node's update frequency is low, the latency may be large to pull the first value.
  2. In subscription model, one sample failure will cause permanent halt to the whole task.
  3. And may be other problems.
    Thus, this PR rewrote the subscription logic, and changed the subscription value on push (with some performance optimization) to avoid "badWaitingForInitialData" after long term running.

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 21.66667% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.86%. Comparing base (335048c) to head (b1e2a2f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ipe/sink/protocol/opcua/server/OpcUaNameSpace.java 7.84% 47 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17525      +/-   ##
============================================
- Coverage     39.86%   39.86%   -0.01%     
  Complexity      312      312              
============================================
  Files          5137     5137              
  Lines        347275   347325      +50     
  Branches      44262    44267       +5     
============================================
+ Hits         138453   138467      +14     
- Misses       208822   208858      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant